From b973ec93fc80d8e32fc808b4176be8e474d5b5bb Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Wed, 30 Aug 2006 09:47:24 +0100 Subject: [PATCH] Shadow memory should be in MiB, not KiB. It also needs rounding up to be safe. Signed-off-by: Ewan Mellor --- tools/python/xen/xend/XendDomainInfo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index f9bf32e8c7..fbb60c0c30 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -1301,7 +1301,8 @@ class XendDomainInfo: balloon.free(mem_kb + shadow_kb) # Set up the shadow memory - shadow_cur = xc.shadow_mem_control(self.domid, shadow_kb * 1024) + shadow_cur = xc.shadow_mem_control(self.domid, + (shadow_kb + 1023) / 1024) self.info['shadow_memory'] = shadow_cur # initial memory allocation -- 2.30.2